﻿using BCEntity.MakeStaticPagingComponent.PageTemplate;
using System;
using System.Collections.Generic;
using System.Text;

namespace BCService.MakeStaticPagingComponent.PageTemplateSerialize.HandleSaveFile
{
    /// <summary>
    /// 处理保存文件
    /// </summary>
    public interface IHandleSaveFileService
    {
        /// <summary>
        /// 设置内容Id
        /// </summary>
        /// <param name="contentId">内容Id</param>
        void SetContentId(long contentId);
        /// <summary>
        /// 插入页面附件及构建head区域
        /// </summary>
        /// <param name="pageTemplateEntity">页面模板信息</param>
        /// <param name="html">页面html</param>
        /// <returns></returns>
        string SettingHeadAndAppendAttachments(PageTemplateEntity pageTemplateEntity, string html);
        /// <summary>
        /// 获取父级页面路径
        /// </summary>
        /// <param name="pageTemplateEntity">页面模板信息</param>
        /// <returns></returns>
        string GetParentPagePath(PageTemplateEntity pageTemplateEntity);
        /// <summary>
        /// 保存文件
        /// </summary>
        /// <param name="html">html</param>
        /// <param name="path">保存路径</param>
        /// <param name="level">路径级别</param>
        /// <param name="fileName">文件名称</param>
        /// <param name="index">当前页码</param>
        void SaveHtml(string html, string path, int level, string fileName, int? index);
    }
}
